Field of the Invention
This invention relates to systems and methods for storing and accessing data in a flash memory system.
Background of the Invention
Solid-state drives, also referred to as SSDs, are data storage devices that make use of NAND flash memory devices as storage elements. Typically they have a SSD controller that accepts host commands on one end and communicate to the NAND flash on the other. NAND flash is a type of non-volatile storage device that retains data when powered off. The SSD controller accesses the NAND flash device through the NAND interface.
A NAND flash device includes a plurality of flash-blocks or blocks each divided into a plurality of pages. NAND flash has a fundamental limitation on write operations: a flash page has to be erased before write can happen and erasure has to be done in flash-block granularity. This characteristic makes necessary garbage collection (GC), an operation that reads a flash block, discard invalid data (garbage), preserves valid data by writing it to another fresh block, and erase the first block to prepare it for a new incoming write.
Garbage collection can consume a lot of read/write bandwidth and causes write amplification (WA), which reduces NAND flash lifespan. In a conventional NAND-based storage, data is always valid until being explicitly deleted. GC has to preserve all data that hasn't been deleted. An SSD vendor therefore has to perform Over Provision (OP), which preserves a portion of total storage capacity for GC usage. OP can reduce WA to a certain level, but at the cost of less useable space to users.
The apparatus and methods disclosed herein provide an improved approach for performing garbage collection in a NAND flash device.